<template>
    <div class="">
        <el-container class="form-container" style="">
            <el-card class="box-card" shadow="never">
                
                <div slot="header" class="clearfix">
                    <span>访问策略</span>
                    <el-button type="primary" size="mini" style="float:right;padding: 6px 9px;margin-left:10px" @click="handlerEdit">编辑</el-button>
                </div>
                <el-form ref="form"   :model="form" size="small" label-width="160px">
                <div >
                    <el-row>
                    
                    <el-col :span="24">
                        <el-form-item  label="策略名称">
                            {{form.fdName}}
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item  label="rest应用Id">
                           {{form.fdRestId}}
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item  label="密钥">
                           {{form.fdKey}}
                        </el-form-item>
                    </el-col>
                    </el-row>
                    <el-row>
                    <el-col :span="12">
                        <el-form-item  label="访问策略">
                            <el-radio-group v-model="form.fdAuthType" disabled>
                                <el-radio v-for="item in authTypeEnums" :key="item.value" :label="item.value">{{item.text}}</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item  label="校验时长">
                            {{form.fdAuthTime}}分钟
                        </el-form-item>
                    </el-col>
                    </el-row>
                    <el-row>
                    <el-col :span="12">
                        <el-form-item  label="限制访问IP">
                            {{form.fdAuthIp}}
                        </el-form-item>
                    </el-col>
                    </el-row>
                    <el-row>
                    <el-col :span="24">
                        <el-form-item  label="备注">
                            {{form.fdRemark}}
                        </el-form-item>
                    </el-col>
                    </el-row>
                    <el-row>
                    <el-col :span="24">
                        <el-form-item  label="创建时间">
                            {{form.fdCreateTime}}
                        </el-form-item>
                    </el-col>
                    </el-row>
                </div>
                </el-form>
            </el-card>
        </el-container>
    </div>
</template>
<script>
import {view} from '@/components/mixins/form';
export default {
    name: "sysRestPolicyAdd",
    components: {
    },
    data() {
        return {
            editUrl:'/sys/rest/sys_rest_policy/edit',
            fetchUrl:'/api/sys/rest/sys_rest_policy',
            form: {
                fdCreateTime:'',
                fdName:'',
                fdKey:'',
                fdRestId:'',
                fdAuthType:'',
                fdAuthIp:'',
                fdRemark:'',
                fdAuthTime:'',
                fdId:''
            },
            authTypeEnums:[
                {
                    value:"anno",
                    text:"匿名",
                },
                {
                    value:"token",
                    text:"令牌模式",
                }
            ]
        }
    },
    mixins:[view]
}
</script>
<style scoped >
@import "~@/assets/css/form.css";
</style>